package com.woniu.woniuticket.controller;


import com.woniu.woniuticket.common.Result;
import com.woniu.woniuticket.entity.LoginPc;
import com.woniu.woniuticket.service.ILoginPcService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author spirit
 * @since 2020-03-02
 */
@RestController
@Slf4j
@RequestMapping("/woniuticket/pc")
@CrossOrigin("*")
public class LoginPcController {
    @Autowired
    private ILoginPcService ils;


    @PostMapping("/login")
    public Result login(@RequestBody(required = false) LoginPc loginPc){
        log.info(loginPc.toString());
        LoginPc result = ils.login(loginPc);
        return Result.success(result);
    }
}

